<%@ page import="com.conversationboard.config.*" %>
<%@ page import="com.conversationboard.model.*" %>

<%@page pageEncoding="UTF-8"%>
<%@page contentType="text/html;charset=UTF-8"%>

<% 
	// Pick up the Board ID from the HTTP GET parameter
	String boardId = (String) request.getParameter("boardid");
	int boardIdNumber = Integer.parseInt(boardId);

	// Pick up the Thread ID from the HTTP GET parameter
	String threadId = (String) request.getParameter("threadid");
	int threadIdNumber = Integer.parseInt(threadId);

	// Pick up the Message ID from the HTTP GET parameter
	String messageId = (String) request.getParameter("messageid");
	int messageIdNumber = Integer.parseInt(messageId);
	
%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>Webmail</title>
		<link rel="stylesheet" type="text/css" href="<%=Configuration.getInstance().getRoot()%>/Stylesheets/<%=StyleSheets.getStyleSheetFileName(request.getCookies())%>">
	</head>

	<body>
	
		<div class="headingblock">
			<h1>Webmail</h1>
		</div>

		<div class="mainblock">		

			<h3>Send an email</h3>

			<p>Please note that this will not send your email address in the "reply to" field. If you want the person you're sending a webmail to know
			   your email address, please include it in the text.</p>
			
			<form class="formsection" action="<%=Configuration.getInstance().getRoot()%>/WebMailControllerServlet" method="post">
			 	
			 	<input name="messageid" value="<%=messageIdNumber%>" type="hidden" />
			 	<input name="threadid" value="<%=threadIdNumber%>" type="hidden" />
			 	<input name="boardid" value="<%=boardIdNumber%>" type="hidden" />
			 	
			 	<textarea class="textbox" name="text" rows=6 cols=80></textarea><br /><br />
			 	
				<% if (Configuration.getInstance().isCaptchaEnabled()) { %>
	
					<img src="captcha.jpg"></img><br />
			
					<p><em>If you cannot read the above text, please refresh your browser and a new image
					   will be delivered</em></p>
					   
				 	<label for="captcha">Enter what you see in the above image:</label>
				 	<input name="captcha" class="textbox" type="text" size=100 /><br /><br />
					
					
				
				<% } %>
			 	
			 	<input type="submit" value="Send Email" />
			 	<input type="reset" value="Clear" />
			</form>
		</div>
		
		<!--<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>-->
		<!--<script type="text/javascript">_uacct = "UA-1148679-1";urchinTracker();</script>--> 
			
	</body>
	
</html>